/// <reference path="jquery-1.9.1.js" />
/// <reference path="jquery-ui-1.9.2.custom.min.js" />

$(function () {

    var h = $("#right").height();
    
    $("#left").css("min-height", h);

    //$("#txtSearch").autocomplete({
    //    source:function(request,response){
    //        $.ajax({
    //            url: "Getname.asmx/GetProductName",
    //            data: "{'name':'" + response.term.toLowerCase() + "'}",
    //            type: "POST",
    //            dataType: "json",
    //            contentType: "application/json;charset=utf-8",
    //            success: function (result) {
    //                response(result.d);
    //            },
    //            error: function (result) {
    //                alert('zzzzzzzzzzzz');
    //            }
    //        });
    //    },
    //    minLength:1

    //});



   
    $("#txtSearch").autocomplete({
            source: function (request, response) {
                $.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: "Getname.asmx/GetProductName",
                    dataType: "json",
                    data: "{'name':'" + request.term + "'}",
                    success: function (data) {
                        response(data.d)
                    }
                });
            },
            minLength: 2,
           
        
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(textStatus);
            }
        });

    });
